Show an alert dialog when no appropriate file manager was found#7452
Conversation
|
Now those no-file-manager-installed issues shall be opened no more. Note: I think all usages of "file-picker" and "directory-picker" should be unhyphenated (as in "file picker" and "directory picker"), same with "download-settings". sorry for nitpicking |
Stypox
left a comment
There was a problem hiding this comment.
Isn't there too much code duplication? Why not just add a launchAndCheck(ActivityResultLauncher<Intent>, Intent, Context) function to NoFileManagerHelper, that does the try-catch?
app/src/main/java/org/schabi/newpipe/streams/io/NoFileManagerSafeGuard.java
Outdated
Show resolved
Hide resolved
|
Kinda makes you wonder how they managed to install the app in the first place, huh? 😉 |
This comment has been minimized.
This comment has been minimized.
Stypox
left a comment
There was a problem hiding this comment.
The code looks good to me, except from the string ;-)
Co-authored-by: Stypox <stypox@pm.me>
Black magic I guess 😆 (they likely installed it with F-Droid which requires no file-manager for installation) |

What is it?
Description of the changes in your PR
Before/After Screenshots/Screen Record
<App crashed>Fixes the following issue(s)
ActivityNotFoundException(file-manager) and display a meaningful error #7113 and more than 10 other issues where users managed to have no file-manager.APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.
Due diligence
How to test this?
To test this you have to get rid of all your file-managers (may led to data loss or other side effects). This may require disabling system apps.
I strongly recommend doing this on an emulator only!
How to do it on an emulated Android 10 device:
adb shell(ensure that you are connected to the correct device!)supm disable com.android.documentsui→ Now you can deploy NewPipe to the emulator and check if the changes work as expected